In recent years, a display device provided with a light-detecting sensor (also referred to as a photosensor) has attracted attention. A display device having a photosensor in a display region, which can detect a touch of an object to be detected (e.g., a pen and a finger) on the display region, is called a touch panel, a touch screen, or the like (hereinafter simply called a “touch panel”). Such a photosensor provided in the display region enables the display region to double as an input region; as an example, a semiconductor device having an image loading function has been disclosed in Patent Document 1.